#include<bits/stdc++.h>
using namespace std;
int A[100005];
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    for(int i=1;i<=n;i++){
        int x;
        cin>>x;
        A[x]++;
    }
    int tot=0,ans=0;
    for(int i=1;i<=100000;i++){
        ans+=min(tot,A[i]);
        tot-=min(tot,A[i]);
        tot+=A[i];
    }
    cout<<n-ans;
}
